Skip to content

Conversation

@ANISH-SR
Copy link

@ANISH-SR ANISH-SR commented Jan 4, 2026

Summary of the PR

  • Added .buildkite/selective-tests.sh: New helper script to run unit tests only for crates affected by a PR, with safe fallbacks.
  • Compares against origin/main and detects workspace-wide vs crate-local changes.
  • If global files (e.g. Cargo.toml, CI config) change or no crate is detected, runs full cargo test --workspace (unchanged behavior).
  • If only specific vhost-device-* crates change, runs cargo test -p for just those crates.
  • Only the four unit-test commands in main-tests.json now call the wrapper script.

Fixes #791

@ANISH-SR
Copy link
Author

ANISH-SR commented Jan 4, 2026

Would like to know your views on this.. @epilys

Signed-off-by: ANISH-SR <rawatanish08@gmail.com>
@ANISH-SR
Copy link
Author

Hi @dorindabassey , I have rebased the changes here! lmk if other changes are needed here too! thanks : )

@stefano-garzarella
Copy link
Member

@ANISH-SR please put more effort on commit descriptions. It's not acceptable to have empty commit for this kind of changes. Please take a look at https://docs.kernel.org/process/submitting-patches.html#describe-your-changes

@epilys
Copy link
Member

epilys commented Jan 12, 2026

I don't like this approach (running tests via a script). Feels needlessly complex just to save 2-3 mins of CI (this is how much testing takes now). I think the issue you refer to, #791, might have been misguided.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CI: There's no need to run unit tests/coverage for all crates if a PR touches only a specific crate and *nothing* workspace-wide

3 participants